import request from '@/axios'

//获取所有用户
export const getAllUserApi = (data: any): Promise<IResponse> => {
  return request.get({ url: '/sys/user/manage/all', params: data })
}
//启用禁用
export const banUserApi = (data: any): Promise<IResponse> => {
  return request.get({ url: '/sys/user/enable', params: data })
}
//分成记录
export const getProportionListApi = (data: any): Promise<IResponse> => {
  return request.get({ url: '/payOrderInvite/pageList/proportion', params: data })
}
//收益
export const getEarningsListApi = (data: any): Promise<IResponse> => {
  return request.get({ url: '/payOrder/pageList/earnings', params: data })
}
//收益记录查看用户观看多少条数
export const getEarningsTotalApi = (data: any): Promise<IResponse> => {
  return request.get({ url: '/advertisingRecord/getCount', params: data })
}
//新增用户查询
export const getAddUserListApi = (data: any): Promise<IResponse> => {
  return request.get({ url: '/userDataStatistics/pageList', params: data })
}
//渠道

export const getAllPartnerApi = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/sys/user/all/partner', params: data })
}
//添加合伙人根据code查询
export const getUserCodeApi = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/sys/user/getByCode', params: data })
}
//留存情况
export const getUserKeepApi = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/sys/user/manage/keep', params: data })
}
//合伙人管理
export const getUserPartnerApi = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/sysUserPartner/pageList', params: data })
}
//合伙人管理
export const saveUserPartnerApi = (data?: any): Promise<IResponse> => {
  return request.post({ url: '/sysUserPartner/save', data })
}
//合伙人管理
export const DeleteUserPartnerApi = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/sysUserPartner/delete', params: data })
}

//ip限制列表
export const getSysLogsLogin = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/sysLogsLogin/pageList', params: data })
}
//ip限制详情
export const getSysLogsLoginDetail = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/sysLogsLogin/detail', params: data })
}
//ip解封封禁
export const switchIpStatus = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/sys/user/enable', params: data })
}

//邀请奖励列表
export const getInviteList = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/inviteDictionary/pageList', params: data })
}
//邀请奖励修改
export const getInviteSave = (data?: any): Promise<IResponse> => {
  return request.post({ url: '/inviteDictionary/save', data })
}

// 提现审批
export const getWithdrawList = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/payOrder/pageList/approve', params: data })
}
// 提现审批同意
export const getWithdrawOperate = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/payOrder/withdraw/operate', params: data })
}

// 用户提现金额列表
export const getUserWithdrawList = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/withdrawApproveLimit/pageList', params: data })
}
// 用户提现金额更新
export const getUserWithdrawSave = (data?: any): Promise<IResponse> => {
  return request.post({ url: '/withdrawApproveLimit/save', data })
}

//新增实时统计
export const GetDataListByTodayApi = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/userDataStatistics/getDataListByToday', params: data })
}
//权益中心
export const GetLevelDictionaryListApi = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/levelDictionary/pageList', params: data })
}
//权益中心-等级
export const SaveLevelDictionaryListApi = (data?: any): Promise<IResponse> => {
  return request.post({ url: '/levelDictionary/update', data })
}
//权益中心-权益图片
export const SaveLevelImgApi = (data?: any): Promise<IResponse> => {
  return request.post({ url: '/levelInterestsDictionary/update', data })
}
//权限分配-金币比例列表
export const GetGoldRatioListApi = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/goldRatio/pageList', params: data })
}
//权限分配-金币比例保存
export const SaveGoldRatioListApi = (data?: any): Promise<IResponse> => {
  return request.post({ url: '/goldRatio/save', data })
}
//权限分配-大盘比例列表
export const GetMarketRatioListApi = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/advertisingRule/pageList', params: data })
}
//权限分配-大盘比例保存
export const SaveMarketRatioListApi = (data?: any): Promise<IResponse> => {
  return request.post({ url: '/advertisingRule/save', data })
}
//广告条数统计
export const GetAdvertisingTotalApi = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/sysLogsLogin/user', params: data })
}
//所有用户导出
export const GetExportAllUserApi = (data?: any): Promise<IResponse> => {
  return request.get({ url: '/sys/user/export', params: data, responseType: 'blob' })
}
